package com.qf.day07.work;

import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) {
        Soldier soldier = new Soldier("张三",100,100,100,100);
        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.println("请选择人物：1.英雄 2.战士 3.退出");
            int num =  scanner.nextInt();
            switch(num){
                case 1 :
                    System.out.println( soldier.strike());
                    System.out.println(soldier);
                    break;
                case 2:
                    System.out.println( soldier.unarmedAttack());
                    System.out.println(soldier);
                    break;
                case 3:
                    System.out.println("退出！！！");
                    return;
                default:
                    System.out.println("选择错误重新选择");
            }
        }
    }
}
